package com.itmd.service;

import com.itmd.dao.Account;
import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class TransService {


    @Autowired
    private Account account;

//    public void setAccount(Account account) {
//        this.account = account;
//    }

    public TransService() {

    }

    @Transactional
    public void tarnsMoney(String outman,  String inman, double money) {
        account.out(outman,money);
        int i = 1/0;
        account.in(inman,money);
    }
}
